package org.kaindorf.kainflix.metadata.controller;

import org.kaindorf.kainflix.metadata.repository.entity.Customer;
import org.kaindorf.kainflix.metadata.repository.entity.Product;
import org.kaindorf.kainflix.metadata.service.CustomerService;
import org.kaindorf.kainflix.metadata.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class CustomerController {

    @Autowired
    private CustomerService customerService;

    @RequestMapping("/customers")
    public Iterable<Customer> allCustomers() {
        return customerService.getAllCustomers();
    }

}
